package com.videoweb.service;

import com.baomidou.mybatisplus.extension.service.IService;

import com.videoweb.entity.User;
import com.videoweb.entity.dto.UserInfoDTO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lmr
 * @since 2025-05-15
 */
@Service
public interface IUserService extends IService<User> {

    public List<User> findAllUsers();

    public List<User> selectAllUser();

    public boolean addUser(User user);

//查找用户根据用户名
    public User findUserByUserName(String username);

    public UserInfoDTO getBaseUserInfo(Long userId);


    //    验证密码是否正确
    public void validate(User user);

    List<Long> getRoleIdsByUserId(Long userId);
    boolean assignRoles(Long userId, List<Integer> roleIds);
    boolean removeRole(Long userId, Long roleId);

}
